{subtemplate common/header}

{if $_G[gp_action] == 'edit'}{eval $editor[value] = $postinfo[message];}{else}{eval $editor[value] = $message;}{/if}
<script type="text/javascript" src="{$_G['setting']['jspath']}forum_post.js?{VERHASH}"></script>

<!--{block actiontitle}-->
	<!--{if $_G['gp_action'] == 'newthread'}-->
		<!--{if $special == 0}-->{lang post_newthread}
		<!--{elseif $special == 1}-->{lang post_newthreadpoll}
		<!--{elseif $special == 2}-->{lang post_newthreadtrade}
		<!--{elseif $special == 3}-->{lang post_newthreadreward}
		<!--{elseif $special == 4}-->{lang post_newthreadactivity}
		<!--{elseif $special == 5}-->{lang post_newthreaddebate}
		<!--{elseif $specialextra}-->{$_G['setting']['threadplugins'][$specialextra][name]}
		<!--{/if}-->
	<!--{elseif $_G['gp_action'] == 'reply' && !empty($_G['gp_addtrade'])}-->
		{lang trade_add_post}
	<!--{elseif $_G['gp_action'] == 'reply'}-->
		{lang join_thread}
	<!--{elseif $_G['gp_action'] == 'edit'}-->
		<!--{if $special == 2}-->{lang edit_trade}<!--{else}-->{lang edit_thread}<!--{/if}-->
	<!--{/if}-->
<!--{/block}-->

<!--{block icon}-->
	<!--{if $special == 1}-->poll
	<!--{elseif $special == 2}-->trade
	<!--{elseif $special == 3}-->reward
	<!--{elseif $special == 4}-->activity
	<!--{elseif $special == 5}-->debate
	<!--{elseif $isfirstpost && $sortid}-->sort
	<!--{/if}-->
<!--{/block}-->

<!--{block homenavigation}-->
	<!--{if $homedo}-->&rsaquo; <a href="home.php">$_G['setting']['navs'][4]['navname']</a> &rsaquo; <a href="home.php?mod=space&do=$homedo"><!--{if $special == 0}-->{lang userabout_thread}<!--{elseif $special == 1}-->{lang thread_poll}<!--{elseif $special == 2}-->{lang thread_trade}<!--{elseif $special == 3}-->{lang thread_reward}<!--{elseif $special == 4}-->{lang thread_activity}<!--{elseif $special == 5}-->{lang thread_debate}<!--{/if}--></a><!--{/if}-->
<!--{/block}-->

<div id="pt" class="wp"><a href="index.php" class="nvhm">$_G[setting][bbname]</a> $navigation$homenavigation &rsaquo; $actiontitle</div>

{eval $adveditor = $isfirstpost && $special || $special == 2 && ($_G['gp_action'] == 'newthread' || $_G['gp_action'] == 'reply' && !empty($_G['gp_addtrade']) || $_G['gp_action'] == 'edit' && $thread['special'] == 2);}
{eval $advmore = !$showthreadsorts && !$special || $_G['gp_action'] == 'reply' && empty($_G['gp_addtrade']) || $_G['gp_action'] == 'edit' && !$isfirstpost && ($thread['special'] == 2 && !$special || $thread['special'] != 2);}
<div id="ct" class="wp cl">
	<div class="mn">
		<div class="ch">
			<label class="wx{if $_G['basescript'] == 'forum' && $homedo} home{elseif $_G[gp_from] == 'portal'} portal{/if}">
				<!--{if $_G['basescript'] == 'forum' && $_G['forum']['status'] != 3 && !$homedo}-->
					<!--{if $_G[gp_from] != 'portal'}-->
						<a href="$_G[setting][navs][2][filename]">$_G[setting][navs][2][navname]</a>
					<!--{else}-->
						<a href="portal.php">{lang portal}</a>
					<!--{/if}-->
				<!--{elseif $_G['basescript'] == 'group' || $_G['forum']['status'] == 3}-->
					<a href="$_G[setting][navs][3][filename]">$_G[setting][navs][3][navname]</a>
				<!--{elseif $_G['basescript'] == 'forum' && $homedo}-->
					<a href="$_G[setting][navs][3][filename]">$_G[setting][navs][4][navname]</a>
				<!--{/if}-->
			</label>
			{hook/post_header}
			<!--{if $_G[gp_action] == 'newthread'}-->
				<!--{if !$homedo}-->
					<button type="button" class="pn" onclick="window.location.href='$returnurl';"><em>&lsaquo; {lang return_forumdisplay}</em></button>
				<!--{else}-->
					<button type="button" class="pn" onclick="window.location.href='home.php?mod=space&do=$homedo';"><em>&lsaquo; {lang post_back_space}</em></button>
				<!--{/if}-->
			<!--{else}-->
				<button type="button" class="pn" onclick="window.location.href='forum.php?mod=viewthread&tid=$_G[tid]{if $_G[gp_from]}&from=$_G[gp_from]{/if}'"><em>&lsaquo; {lang post_back_topic}</em></button>
			<!--{/if}-->
		</div>
		<form method="post" autocomplete="off" id="postform"
			{if $_G[gp_action] == 'newthread'}action="forum.php?mod=post&action={if $special != 2}newthread{else}newtrade{/if}&fid=$_G[fid]&extra=$extra&topicsubmit=yes"
			{elseif $_G[gp_action] == 'reply'}action="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&extra=$extra&replysubmit=yes"
			{elseif $_G[gp_action] == 'edit'}action="forum.php?mod=post&action=edit&extra=$extra&editsubmit=yes&mod=$mod" $enctype
			{/if}
			onsubmit="return validate(this)">
			<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
			<input type="hidden" name="posttime" id="posttime" value="{TIMESTAMP}" />
			<!--{if !empty($_G['gp_modthreadkey'])}--><input type="hidden" name="modthreadkey" id="modthreadkey" value="$_G['gp_modthreadkey']" /><!--{/if}-->
			<input type="hidden" name="wysiwyg" id="{$editorid}_mode" value="$editormode" />
			<!--{if $_G[gp_action] == 'reply'}-->
				<input type="hidden" name="noticeauthor" value="$noticeauthor" />
				<input type="hidden" name="noticetrimstr" value="$noticetrimstr" />
				<input type="hidden" name="noticeauthormsg" value="$noticeauthormsg" />
			<!--{/if}-->
			<!--{if $_G[gp_action] == 'edit'}-->
				<input type="hidden" name="fid" id="fid" value="$_G[fid]" />
				<input type="hidden" name="tid" value="$_G[tid]" />
				<input type="hidden" name="pid" value="$pid" />
				<input type="hidden" name="page" value="$_G[gp_page]" />
			<!--{/if}-->
			<!--{if $special}-->
				<input type="hidden" name="special" value="$special" />
			<!--{/if}-->
			<!--{if $specialextra}-->
				<input type="hidden" name="specialextra" value="$specialextra" />
			<!--{/if}-->
			<div class="bm cl"{if !$showthreadsorts && !$adveditor} id="editorbox"{/if}>
				<h1 id="sti" class="mt">
					<em class="wx $icon" id="returnmessage">
						$actiontitle
						<!--{if $showthreadsorts}--> $_G['forum'][threadsorts][types][$sortid]<!--{/if}-->
						<!--{if $_G[gp_action] == 'newthread' && $modnewthreads}--><span class="xg1">({lang approve})</span><!--{/if}-->
						<!--{if $_G[gp_action] == 'reply' && $modnewreplies}--><span class="xg1">({lang approve})</span><!--{/if}-->
					</em>
				</h1>
				<div id="postbox">
					{hook/post_top}
					<div class="pbt cl">
						<div class="z">
							<!--{if !$special && ($threadsorts = $_G['forum']['threadsorts']) && ($_G[gp_action] == 'newthread' || $_G[gp_action] == 'edit' && $isfirstpost && !$thread['sortid'])}-->
							<div class="ftid">
								<select name="sortid" id="sortid" change="switchsort()">
								<!--{if !$_G['forum']['threadsorts']['required']}--><option value="0">{lang threadtype_option}</option><!--{/if}-->
								<!--{loop $threadsorts[types] $tsortid $name}-->
									<option value="$tsortid"{if $sortid == $tsortid} selected="selected"{/if}>{echo strip_tags($name);}</option>
								<!--{/loop}-->
								</select>
							</div>
							<!--{/if}-->
							<!--{if $_G[gp_action] == 'edit' && $isfirstpost && $sortid}-->
								<input type="hidden" name="sortid" value="$sortid" />
							<!--{/if}-->
							<!--{if $isfirstpost && !empty($_G['forum'][threadtypes][types])}-->
							<div class="ftid">
								<select name="typeid" id="typeid">
								<option value="0">{lang types}</option>
								<!--{loop $_G['forum'][threadtypes][types] $typeid $name}-->
									<option value="$typeid"{if $thread['typeid'] == $typeid || $_G['gp_typeid'] == $typeid} selected="selected"{/if}>{echo strip_tags($name);}</option>
								<!--{/loop}-->
								</select>
							</div>
							<!--{/if}-->
						</div>
						<!--{if $_G[gp_action] == 'reply' && !empty($_G['gp_addtrade']) || $_G[gp_action] == 'edit' && $thread['special'] == 2 && !$postinfo['first']}-->
							<input name="subject" type="hidden" value="" />
						<!--{else}-->
							<!--{if $_G[gp_action] != 'reply'}-->
								<span><input type="text" name="subject" id="subject" class="px" value="$postinfo[subject]" tabindex="1" style="width: 25em" /></span>
							<!--{else}-->
								<span id="subjecthide" class="z">RE: $thread[subject] [<a href="javascript:;" onclick="display('subjecthide');display('subjectbox');$('subject').value='RE: {echo htmlspecialchars(str_replace('\'', '\\\'', $thread[subject]))}'">{lang modify}</a>]</span>
								<span id="subjectbox" style="display:none"><input type="text" name="subject" id="subject" class="px" value="" tabindex="1" style="width: 25em" /></span>
							<!--{/if}-->
						<!--{/if}-->
						<!--{if $_G[gp_action] == 'edit' && ($isfirstpost && $thread['replies'] < 1 || !$isfirstpost && ($isorigauthor || $_G['forum']['ismoderator']))}-->
							<!--{if !$rushreply}-->
							<div class="y"><input type="checkbox" name="delete" id="delete" class="pc" value="1" title="{lang post_delpost}{if $thread[special] == 3}{lang reward_price_back}{/if}"><label for="delete">{lang delete_check}</label></div>
							<!--{/if}-->
						<!--{/if}-->
					</div>
					<!--{if !$isfirstpost && $thread[special] == 5 && empty($firststand) && $_G[gp_action] != 'edit'}-->
					<div class="pbt cl">
						<div class="ftid">
							<select name="stand" id="stand">
								<option value="">{lang debate_viewpoint}</option>
								<option value="0">{lang debate_neutral}</option>
								<option value="1"{if $stand == 1} selected="selected"{/if}>{lang debate_square}</option>
								<option value="2"{if $stand == 2} selected="selected"{/if}>{lang debate_opponent}</option>
							</select>
						</div>
					</div>
					<!--{/if}-->
			<!--{if $showthreadsorts}-->
				<div class="exfm cl" id="threadsorts">
					<span id="threadsortswait"></span>
				</div>
			<!--{elseif $adveditor}-->
				<!--{if $special == 1}-->{template forum/post_poll}
				<!--{elseif $special == 2 && ($_G[gp_action] != 'edit' || ($_G[gp_action] == 'edit' && ($thread['authorid'] == $_G['uid'] && $_G['group']['allowposttrade'] || $_G['group']['allowedittrade'])))}-->{template forum/post_trade}
				<!--{elseif $special == 3}-->{template forum/post_reward}
				<!--{elseif $special == 4}-->{template forum/post_activity}
				<!--{elseif $special == 5}-->{template forum/post_debate}
				<!--{elseif $specialextra}--><div class="specialpost s_clear">$threadplughtml</div>
				<!--{/if}-->
			<!--{/if}-->			

			<div class="edt">
				<div id="{$editorid}_controls" class="bar">
					<span id="{$editorid}_switcher" class="y">
						<label><input type="checkbox" class="pc" name="checkbox" value="0" {if !$editor[editormode]}checked="checked"{/if} onclick="switchEditor(this.checked?0:1)" />{lang code}</label><br />
						<a id="{$editorid}_fullswitcher"></a>
					</span>
					<div class="btn cl">
						<div class="b1r">
							<a id="{$editorid}_paste" title="{lang e_paste}">{lang e_paste}</a>
						</div>
						<div class="b2r">
							<a id="{$editorid}_undo" title="{lang e_undo}">Undo</a>
							<a id="{$editorid}_redo" title="{lang e_redo}">Redo</a>
							<p>
								<a id="{$editorid}_svd" title="{lang post_savedata}">Savedata</a>
								<a id="{$editorid}_rst" title="{lang post_autosave_restore}">Loaddata</a>
							</p>
						</div>
						<div class="b2r">
							<a id="{$editorid}_smp" title="{lang e_bold}">B</a>
							<a id="{$editorid}_fontname" title="{lang e_fontname}">Font</a>
							<a id="{$editorid}_fontsize" title="{lang e_fontsize}">Size</a>
							<a id="{$editorid}_forecolor" title="{lang e_forecolor}">Color</a>
							<p>
								<a id="{$editorid}_tbl" title="{lang e_table}">Table</a>
								<a id="{$editorid}_chck" title="{lang post_check_length}">Checklength</a>
								<a id="{$editorid}_removeformat" title="{lang e_removeformat}">Removeformat</a>
								<a id="{$editorid}_tpr" title="{lang post_topicreset}">Clearcontent</a>
							</p>
						</div>
						<div class="b2r">
							<a id="{$editorid}_url" title="{lang e_url}">Url</a>
							<a id="{$editorid}_prg" title="{lang e_paragraph}">P</a>
							<!--{if $isfirstpost && $_G['group']['allowhidecode']}-->
								<a id="{$editorid}_hide" title="{lang e_hide}">Hide</a>
							<!--{/if}-->
							<p>
								<a id="{$editorid}_unlink" title="{lang e_unlink}">Unlink</a>
								<a id="{$editorid}_lst" title="{lang e_list}">List</a>
								<!--{if $isfirstpost}--><a id="{$editorid}_free" title="{lang e_free}">Free</a><!--{/if}-->
							</p>
						</div>

						<div class="b1r">
							<a id="{$editorid}_sml" title="{lang e_smilies_title}">{lang e_smilies}</a>
								<div id="{$editorid}_imagen" style="display:none">!</div>
								<a id="{$editorid}_image" title="{lang e_image_title}">{lang e_image}</a>
								<!--{if $_G['group']['allowpostattach']}-->
									<div id="{$editorid}_attachn" style="display:none">!</div>
									<a id="{$editorid}_attach" title="{lang e_attach_title}">{lang e_attach}</a>
								<!--{/if}-->
								<!--{if $_G['forum']['allowmediacode']}-->
									<a id="{$editorid}_aud" title="{lang e_audio_title}">{lang e_audio}</a>
									<a id="{$editorid}_vid" title="{lang e_video_title}">{lang e_video}</a>
									<a id="{$editorid}_fls" title="{lang e_flash_title}">{lang e_flash}</a>
								<!--{/if}-->
								<a id="{$editorid}_code" title="{lang e_code_title}">{lang e_code}</a>
								<a id="{$editorid}_quote" title="{lang e_quote_title}">{lang e_quote}</a>
						</div>
						<!--{if $_G['forum']['allowbbcode'] && $_G['group']['allowcusbbcode'] && $_G['cache']['bbcodes_display'] || !empty($_G['setting']['magics']['doodle'])}-->
						<div class="b2r">
							<p>
								<!--{if !empty($_G['setting']['magics']['doodle'])}-->
									<a id="a_magic_doodle" href="home.php?mod=magic&mid=doodle&showid=comment_doodle&target={$editorid}_textarea&from=forumeditor" class="cst" onclick="showWindow(this.id, this.href, 'get', 0)"><img src="{STATICURL}image/magic/doodle.small.gif" alt="doodle" title="$_G['setting']['magics']['doodle']" /></a>
								<!--{/if}-->
								<!--{loop $_G['cache']['bbcodes_display'] $tag $bbcode}-->
									<!--{if $bbcode['i'] % 2 != 0}--><a id="{$editorid}_cst{$bbcode[params]}_$tag" class="cst" title="$bbcode[explanation]"><img src="{STATICURL}image/common/$bbcode[icon]" title="$bbcode[explanation]" alt="$tag" /></a><!--{/if}-->
								<!--{/loop}-->
								{hook/post_editorctrl_top}
							</p>
							<p>
								<!--{loop $_G['cache']['bbcodes_display'] $tag $bbcode}-->
									<!--{if $bbcode['i'] % 2 == 0}--><a id="{$editorid}_cst{$bbcode[params]}_$tag" class="cst" title="$bbcode[explanation]"><img src="{STATICURL}image/common/$bbcode[icon]" title="$bbcode[explanation]" alt="$tag" /></a><!--{/if}-->
								<!--{/loop}-->
								{hook/post_editorctrl_bottom}
							</p>
						</div>
						<!--{/if}-->												
					</div>
				</div>

				<div class="area">
					<textarea name="$editor[textarea]" id="{$editorid}_textarea" class="pt" tabindex="1" rows="15">$editor[value]</textarea>
				</div>
				{subtemplate common/editor}
			</div>

			{hook/post_middle}

			<!--{if $_G['group']['maxprice'] && ($_G[gp_action] == 'newthread' || $_G[gp_action] == 'edit' && $isfirstpost)}-->
				<div class="mtm">
					<!--{if $_G['setting']['maxincperthread']}--><img src="{IMGDIR}/arrow_right.gif" />{lang post_price_income_comment}<!--{/if}-->
					<!--{if $_G['setting']['maxchargespan']}--><img src="{IMGDIR}/arrow_right.gif" />{lang post_price_charge_comment}<!--{if $_G[gp_action] == 'edit' && $freechargehours}-->{lang post_price_free_chargehours}<!--{/if}--><!--{/if}-->
				</div>
			<!--{/if}-->

			<!--{if $_G[gp_action] != 'edit' && checkperm('seccode') && ($secqaacheck || $seccodecheck)}-->
				{block sectpl}<sec> <span id="sec<hash>" onclick="showMenu(this.id)"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div>{/block}
				<div class="mtm">{template common/seccheck}</div>
			<!--{/if}-->

			<div class="mtm">
				<!--{if $_G[gp_action] == 'newthread' && $_G['setting']['sitemessage'][newthread] || $_G[gp_action] == 'reply' && $_G['setting']['sitemessage'][reply]}-->
					<a href="javascript:;" id="custominfo" class="y">&nbsp;<img src="{IMGDIR}/info_small.gif" alt="{lang faq}" /></a>
				<!--{/if}-->
				<a href="home.php?mod=spacecp&ac=credit&op=rule&fid=$_G['fid']" class="y" target="_blank">{lang post_credits_rule}</a>
				<button type="submit" id="postsubmit" class="pn pnc" value="true" name="{if $_G[gp_action] == 'newthread'}topicsubmit{elseif $_G[gp_action] == 'reply'}replysubmit{elseif $_G[gp_action] == 'edit'}editsubmit{/if}" tabindex="1">
				<span>
				<!--{if $_G[gp_action] == 'newthread'}-->
					<!--{if $special == 0}-->{lang post_newthread}
					<!--{elseif $special == 1}-->{lang post_newthreadpoll}
					<!--{elseif $special == 2}-->{lang post_newthreadtrade}
					<!--{elseif $special == 3}-->{lang post_newthreadreward}
					<!--{elseif $special == 4}-->{lang post_newthreadactivity}
					<!--{elseif $special == 5}-->{lang post_newthreaddebate}
					<!--{elseif $special == 127}-->
						<!--{if $buttontext}-->$buttontext<!--{else}-->{lang post_newthread}<!--{/if}-->
					<!--{/if}-->
				<!--{elseif $_G[gp_action] == 'reply' && !empty($_G['gp_addtrade'])}-->{lang trade_add_post}
				<!--{elseif $_G[gp_action] == 'reply'}-->{lang join_thread}
				<!--{elseif $_G[gp_action] == 'edit'}-->{lang edit_save}
				<!--{/if}-->
				</span>
				</button>
			</div>
			{hook/post_bottom}
			
			<div class="h bbs"><h3 class="bn">{lang post_additional_options}</h3></div>
			<div class="frame-1-1-1 cl mtm">
				<div class="col-l">
					<!--{if ($_G['forum']['allowhtml'] || ($_G[gp_action] == 'edit' && ($orig['htmlon'] & 1))) && $_G['group']['allowhtml']}-->
						<p class="mbn"><input type="checkbox" name="htmlon" id="htmlon" class="pc" value="1" $htmloncheck /><label for="htmlon">{lang post_html}</label></p>
					<!--{else}-->
						<p class="mbn"><input type="checkbox" name="htmlon" id="htmlon" class="pc" value="0" $htmloncheck disabled="disabled" /><label for="htmlon">{lang post_html}</label></p>
					<!--{/if}-->
					<p class="mbn"><input type="checkbox" id="allowimgcode" class="pc" disabled{if $_G['forum']['allowimgcode']} checked="checked"{/if} /><label for="allowimgcode">{lang post_imgcode}</label></p>
					<p class="mbn"><input type="checkbox" name="parseurloff" id="parseurloff" class="pc" value="1" $urloffcheck tabindex="1" /><label for="parseurloff">{lang disable} {lang post_parseurl}</label></p>
					<p class="mbn"><input type="checkbox" name="smileyoff" id="smileyoff" class="pc" value="1" $smileyoffcheck tabindex="1" /><label for="smileyoff">{lang disable} {lang smilies}</label></p>
					<p class="mbn"><input type="checkbox" name="bbcodeoff" id="bbcodeoff" class="pc" value="1" $codeoffcheck tabindex="1" /><label for="bbcodeoff">{lang disable} {lang discuzcode}</label></p>				
				</div>
				<div class="col-c">
					<!--{if $_G['uid'] && ($_G[gp_action] == 'newthread' || $_G[gp_action] == 'edit' && $isfirstpost) && $special != 3}-->
						<p class="mbn"><input type="checkbox" name="ordertype" id="ordertype" class="pc" value="1" $ordertypecheck tabindex="1" /><label for="ordertype">{lang post_descview}</label></p>
					<!--{/if}-->
					<p class="mbn"><input type="checkbox" name="usesig" id="usesig" class="pc" value="1" {if !$_G['group']['maxsigsize']}disabled {else}$usesigcheck {/if}tabindex="1" /><label for="usesig">{lang post_show_sig}</label></p>
					<!--{if $_G[gp_action] != 'edit'}-->
						<!--{if $_G['group']['allowanonymous']}--><p class="mbn"><input type="checkbox" name="isanonymous" id="isanonymous" class="pc" value="1" tabindex="1" /><label for="isanonymous">{lang post_anonymous}</label></p><!--{/if}-->
					<!--{else}-->
						<!--{if $_G['group']['allowanonymous'] || (!$_G['group']['allowanonymous'] && $orig['anonymous'])}--><p class="mbn"><input type="checkbox" name="isanonymous" id="isanonymous" class="pc" value="1" {if $orig['anonymous']}checked="checked"{/if} tabindex="1" /><label for="isanonymous">{lang post_anonymous}</label></p><!--{/if}-->
					<!--{/if}-->
					<!--{if $_G[gp_action] == 'newthread' && $_G['forum']['ismoderator'] && ($_G['group']['allowdirectpost'] || !$_G['forum']['modnewposts'])}-->
						<!--{if $_G[gp_action] == 'newthread' && $_G['forum']['ismoderator'] && ($_G['group']['allowdirectpost'] || !$_G['forum']['modnewposts'])}-->
							<p class="mbn"><input type="checkbox" name="sticktopic" id="sticktopic" class="pc" value="1" $stickcheck tabindex="1" /><label for="sticktopic">{lang post_stick_thread}</label></p>
							<p class="mbn"><input type="checkbox" name="addtodigest" id="addtodigest class="pc"" value="1" $digestcheck tabindex="1" /><label for="addtodigest">{lang post_digest_thread}</label></p>
						<!--{/if}-->
					<!--{elseif $_G[gp_action] == 'edit' && $_G['forum_auditstatuson']}-->
						<p class="mbn"><input type="checkbox" name="audit" id="audit" class="pc" value="1"><label for="audit">{lang auditstatuson}</label></p>
					<!--{/if}-->
					<!--{if $_G[gp_action] != 'edit' && $_G['forum']['allowfeed']}-->
						<p class="mbn"><input type="checkbox" name="addfeed" id="addfeed" class="pc" value="1" $addfeedcheck><label for="addfeed">{lang addfeed}</label></p>
					<!--{/if}-->
					<!--{if $_G[gp_action] == 'newthread' || $_G[gp_action] == 'edit' && $isfirstpost}-->
						<p class="mbn"><input type="checkbox" name="hiddenreplies" id="hiddenreplies"{if $thread['hiddenreplies']} class="pc" checked="checked"{/if} value="1"><label for="hiddenreplies">{lang hiddenreplies}</label></p>
					<!--{/if}-->
					<!--{if $_G[gp_action] == 'newthread' && $_G['group']['allowpostrushreply']}-->
							<p class="mbn"><input type="checkbox" name="rushreply" id="rushreply" class="pc" value="1"><label for="rushreply">{lang rushreply}</label></p>
					<!--{/if}-->
					<!--{if $_G[gp_action] == 'edit' && getstatus($thread['status'], 3)}-->
							<p class="mbn"><input type="checkbox" disabled="disabled" class="pc" checked="checked"><label for="rushreply">{lang rushreply}</label></p>
					<!--{/if}-->
				</div>
				<div class="col-r">
					<!--{if $_G[gp_action] == 'newthread' || $_G[gp_action] == 'edit' && $isfirstpost}-->
						<!--{if $_G['group']['allowsetreadperm']}-->
						<p>{lang readperm}:</p>
						<p><input type="text" name="readperm" class="px pxs" value="$thread[readperm]" tabindex="1" /> {lang post_zero_is_nopermission}</p>
						<hr class="bk" />
						<!--{/if}-->
						<!--{if $_G['group']['maxprice'] && !$special}-->
						<p>{lang price}({$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]}):</p>
						<p><input type="text" name="price" class="px pxs" value="$thread[pricedisplay]" tabindex="1" /> {$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][unit]} <span title="{lang post_price_free_comment}">{lang post_price_comment}</span>
						<!--{/if}-->
					<!--{/if}-->
				</div>
				{hook/post_side_bottom}
			</div>		
		</div>
	</div>

	</div>

	<div id="psd" class="sd">
		{subtemplate common/userabout}
	</div>
</form>
</div>

<div id="{$editorid}_menus" class="editorrow" style="overflow: hidden; margin-top: -5px; height: 0; border: none; background: transparent;">
	{subtemplate common/editor_menu}
	{subtemplate forum/editor_menu_forum}
</div>

<!--{if $special}-->
<script type="text/javascript" src="{$_G['setting']['jspath']}forum_calendar.js?{VERHASH}"></script>
<!--{/if}-->
<script type="text/javascript">
	var editorsubmit = $('postsubmit');
	var editorform = $('postform');
	var allowpostattach = parseInt('{$_G['group']['allowpostattach']}');
	var allowpostimg = parseInt('$allowpostimg');
	var pid = parseInt('$pid');
	{if $_G['group']['allowpostimage']}
		var extensions = '{$_G['group']['attachextensions']}';
		var imgexts = '$imgexts';
	{else}
		var extensions = '';
		var imgexts = '';
	{/if}
	var postminchars = parseInt('$_G['setting']['minpostsize']');
	var postmaxchars = parseInt('$_G['setting']['maxpostsize']');
	var disablepostctrl = parseInt('{$_G['group']['disablepostctrl']}');
	var seccodecheck = parseInt('$seccodecheck');
	var secqaacheck = parseInt('$secqaacheck');
	var typerequired = parseInt('{$_G[forum][threadtypes][required]}');
	var sortrequired = parseInt('{$_G[forum][threadsorts][required]}');
	var special = parseInt('$special');
	var isfirstpost = {if $isfirstpost}1{else}0{/if};
	var allowposttrade = parseInt('{$_G['group']['allowposttrade']}');
	var allowpostreward = parseInt('{$_G['group']['allowpostreward']}');
	var allowpostactivity = parseInt('{$_G['group']['allowpostactivity']}');
	var sortid = parseInt('$sortid');
	var special = parseInt('$special');
	var fid = $_G['fid'];

	{if $isfirstpost && !empty($_G[forum][threadtypes][types])}
		simulateSelect('typeid');
	{/if}
	{if !$isfirstpost && $thread['special'] == 5 && empty($firststand) && $_G[gp_action] != 'edit'}
		simulateSelect('stand');
	{/if}
	{if !$special && $_G[forum][threadsorts] && ($_G[gp_action] == 'newthread' || $_G[gp_action] == 'edit' && $isfirstpost && !$thread[sortid])}
		simulateSelect('sortid');
		function switchsort() {
			if($('sortid').value) {
				saveData(1);
				{if $isfirstpost && $sortid}
					ajaxget('forum.php?mod=post&action=threadsorts&sortid=' + $('sortid').value + '&fid=$_G[fid]{if !empty($modelid)}&modelid=$modelid{/if}{if !empty($_G[gp_modthreadkey])}&modthreadkey=$_G[gp_modthreadkey]{/if}', 'threadsorts', 'threadsortswait', null, null, function () { seteditorcontrolpos(); });
				{else}
					location.href = 'forum.php?mod=post&action=$_G[gp_action]&fid=$_G[fid]{if !empty($_G[tid])}&tid=$_G[tid]{/if}{if !empty($pid)}&pid=$pid{/if}{if !empty($modelid)}&modelid=$modelid{/if}&extra=$extra{if !$sortid}&cedit=yes{/if}&sortid=' + $('sortid').value;
				{/if}
				Editorwin = 0;
			}
		}
	{/if}
	{if $isfirstpost}
		{if $sortid}
			ajaxget('forum.php?mod=post&action=threadsorts&sortid=$sortid&fid=$_G[fid]{if !empty($_G[tid])}&tid=$_G[tid]{/if}&inajax=1{if !empty($_G[gp_modthreadkey])}&modthreadkey=$_G[gp_modthreadkey]{/if}', 'threadsorts', 'threadsortswait', null, null, function () { seteditorcontrolpos(); });
		{elseif $_G['forum']['threadsorts']['required']}
			{eval $threadsortids = array_keys($threadsorts[types]);}
			ajaxget('forum.php?mod=post&action=threadsorts&sortid={$threadsortids[0]}&fid=$_G[fid]{if !empty($_G[tid])}&tid=$_G[tid]{/if}&inajax=1{if !empty($_G[gp_modthreadkey])}&modthreadkey=$_G[gp_modthreadkey]{/if}', 'threadsorts', 'threadsortswait', null, null, function () { seteditorcontrolpos(); });
		{/if}
	{/if}

	{if $_G[gp_action] == 'newthread' && $_G['setting']['sitemessage'][newthread] || $_G[gp_action] == 'reply' && $_G['setting']['sitemessage'][reply]}
		showPrompt('custominfo', 'click', '{if $_G[gp_action] == 'newthread'}{echo trim($_G['setting']['sitemessage'][newthread][array_rand($_G['setting']['sitemessage'][newthread])])}{elseif $_G[gp_action] == 'reply'}{echo trim($_G['setting']['sitemessage'][reply][array_rand($_G['setting']['sitemessage'][reply])])}{/if}', $_G['setting']['sitemessage'][time]);
	{/if}
	{if $_G['setting']['swfupload'] != 1 && $_G['group']['allowpostattach']}addAttach();{/if}
	{if $_G['setting']['swfupload'] != 1 && $allowpostimg}addAttach('img');{/if}
</script>

{subtemplate common/footer}